<%
    /** 
     * 打印记录
     */
%>
<%  logger.info("构造记录明细区");
    logger.debug("  -- 取记录明细区");
    ItemListArea ilArea = (ItemListArea)request.getAttribute("viewer");
    logger.debug("  -- 取翻页器");
    ValueListHandler valueListHandler  = (ValueListHandler)request.getAttribute("valueListHandler");
    logger.debug("  -- 翻页");
    List models = valueListHandler.getList();
    logger.debug("  -- 显示记录明细");
    if(columns == null)
    {
        logger.info("打印默认列");
        for(int i = 0; i < models.size(); i ++)
        {
            %><tr style="HEIGHT: 21px" ><%
            List items = ilArea.getItems(request.getContextPath(),(BaseObject)models.get(i));
            for(int j = 0; j < items.size(); j ++)
            {
                Item item = (Item)items.get(j);
                if(item.getPrinted())
                {
                %><td <%= FontLayOut.HTML_LAY_OUT_TABS[item.getXLayOut()]%>><%= item.getText4Html()%></td><%
                }
                else
                {
                    continue;
                }
            }
            %></tr><%
        }
        logger.debug("合计");
        List items4Total = ilArea.getTotal(request.getContextPath(),valueListHandler.getList());
        if(items4Total.size() > 0)
        {
            %><tr style="HEIGHT: 21px" ><%
            for(int j = 0; j < items4Total.size(); j ++)
            {
                Item item = (Item)items4Total.get(j);
                if(item.getPrinted())
                {
                %><td <%= FontLayOut.HTML_LAY_OUT_TABS[item.getXLayOut()]%>><%= item.getText4Html()%></td><%
                }
                else
                {
                    continue;
                }
            }//  合计 for 
            %>
            </tr>    
            <%
        }

    }
    else
    {
        logger.info("打印定制列");
        for(int i = 0; i < models.size(); i ++)
        {
            %><tr style="HEIGHT: 21px" ><%
            List items = ilArea.getItems(request.getContextPath(),(BaseObject)models.get(i));
            for(int j = 0; j < columns.length; j ++)
            {
                Item item = (Item)items.get(Integer.parseInt(columns[j]));
                if(item.getPrinted())
                {
                %><td <%= FontLayOut.HTML_LAY_OUT_TABS[item.getXLayOut()]%>><%= item.getText4Html()%></td><%
                }
                else
                {
                    continue;
                }
            }
            %></tr><%
        }
        logger.debug("合计");
        List items4Total = ilArea.getTotal(request.getContextPath(),valueListHandler.getList());
        if(items4Total.size() > 0)
        {
            %><tr style="HEIGHT: 21px" ><%
            for(int j = 0; j < columns.length; j ++)
            {
                Item item = (Item)items4Total.get(Integer.parseInt(columns[j]));
                if(item.getPrinted())
                {
                %><td <%= FontLayOut.HTML_LAY_OUT_TABS[item.getXLayOut()]%>><%= item.getText4Html()%></td><%
                }
                else
                {
                    continue;
                }
            }//  合计 for 
            %>
            </tr>    
            <%
        }
    }
%>
